package com.meituan.sdk.model.ddzh.yuding.updatestock;

import com.meituan.sdk.annotations.ApiMeta;
import java.util.List;
import com.google.gson.reflect.TypeToken;
import javax.validation.constraints.NotBlank;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;
import javax.validation.constraints.NotEmpty;

/**
* 更新三方库存
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzh/yuding/updatestock",
    businessId = 58,
    apiVersion = "10040",
    apiName = "updatestock",
    needAuth = true
)
public class UpdatestockRequest implements MeituanRequest<Boolean> {
    /**
    * <p data-diff-id="ct-diff-id-5c3b27b9-cf80-42c9-829d-d9dc20f79812">三方房间ID &nbsp;</p>
    */
    @NotNull(message = "thirdPartyRoomId不能为空")
    @SerializedName("thirdPartyRoomId")
    private Long thirdPartyRoomId;
    /**
    * <p data-diff-id="ct-diff-id-314bb6e5-baaa-4359-81d0-704778254099">房间名称 &nbsp; &nbsp;&nbsp;</p>
    */
    @NotBlank(message = "roomName不能为空")
    @SerializedName("roomName")
    private String roomName;
    /**
    * <p data-diff-id="ct-diff-id-e6e115f7-1aac-40f3-a585-34770a37a322"><span style="color: rgb(31, 45, 61)">时段库存信息 注：类型为对象类型，详见扩展参数desk_sold_time_periods &nbsp;</span></p>
    */
    @NotEmpty(message = "deskSoldTimePeriods不能为空")
    @SerializedName("deskSoldTimePeriods")
    private List<DeskSoldTimePeriodsSub> deskSoldTimePeriods;

    public Long getThirdPartyRoomId() {
        return thirdPartyRoomId;
    }
    public void setThirdPartyRoomId(Long thirdPartyRoomId) {
        this.thirdPartyRoomId = thirdPartyRoomId;
    }
    public String getRoomName() {
        return roomName;
    }
    public void setRoomName(String roomName) {
        this.roomName = roomName;
    }
    public List<DeskSoldTimePeriodsSub> getDeskSoldTimePeriods() {
        return deskSoldTimePeriods;
    }
    public void setDeskSoldTimePeriods(List<DeskSoldTimePeriodsSub> deskSoldTimePeriods) {
        this.deskSoldTimePeriods = deskSoldTimePeriods;
    }


    @Override
    public MeituanResponse<Boolean> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<Boolean>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "UpdatestockRequest{" + "thirdPartyRoomId=" + thirdPartyRoomId + "," + "roomName=" + roomName + "," + "deskSoldTimePeriods=" + deskSoldTimePeriods + "}";
    }
}
